<?php
	//session_start(); due to server compatability issues
	$currTask = "";

	if (isset($_GET["task"]) && ($_GET["task"] != ""))
	{
		$currTask = $_GET["task"];
	}; 
?>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="admin.css" />
	</head>
	<body>
		<div id="header">
			<h1 align='center'>Admin panel</h1>
			<div id="fields">
				<?php
					include_once 'isUserLogged.php';
				?>
			</div>
		</div>
		<hr />
		<div id="page">
		
			<div id="menu">
				<ul>
					<li><a href="logout.php">Logout</a></li>
					<li><a href="changePassword.php">Change password</a></li>
					<li><hr /></li>
					<li><a href="index.php?task=about">Change "about" content</a></li>
					<li><a href="index.php?task=contacts">Change "contacts" content</a></li>
					<li><a href="index.php?task=flash-widget">Change flash widget</a></li>
					<li><a href="index.php?task=products-widget">Change products widget</a></li>
				</ul>
			</div>
			
			<div id="task-area">
				<?php
					if ($currTask != "")
					{
						include($currTask . ".php");
					}
				?>
			</div>
			
		</div>
	</body>
</html>
